home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Magazin/MacEasy 21
/
Mac Magazin and MacEasy Magazine CD - Issue 21.iso
/
Online
/
URL_Forward_1.0
/
Read Me
< prev
next >
Wrap
Text File
|
1996-03-25
|
4KB
|
88 lines
URL Forward
Copyright 1994-95, by Thomas Reed
URL Forward is a simple background-only application designed to forward Get
URL ('GURL') AppleEvents or AppleScripts to Internet Config. URL Forward is
freeware, so distribute it to anyone you like. Just don't redistribute
modified versions, and don't charge anyone for it!
The Get URL event is designed to request that a particular application go to
that URL (or in the case of a mailto URL, to start a new message to that
URL). Many programs, like FileMaker or QuicKeys, allow you to send
AppleEvents to particular programs or run AppleScripts, but this
functionality is not quite complete. If you want the URL intelligently
handed off to the proper program, you must go through Internet Config, which
can't be sent GURL events. This program bridges the gap and allows such
programs to hand off URLs to the proper program.
Using URL Forward with Apple Events
Just have your program send a GURL event containing the desired URL to URL
Forward. If you have Internet Config installed, the URL will be opened
immediately.
If you don't know the structure of a GURL event, here are some simple
instructions for how to send one. First, the Event Class and Event ID of a
GURL event are both 'GURL' (without the quotes, of course). This is all that
is required to tell a program what event is being sent. The event contains
one parameter containing the URL in plain text format. Different programs
will handle this differently.
In FileMaker, as an example, you would set up a new script and put the Send
Apple Event command in the script. Then click the Send Apple Event command
in the script's command list and click the "Specify..." button. In the
pop-up near the top of the resulting dialog, choose "Other..." and type in
'GURL' in both fields, then click OK. Next, click the Field Value button and
specify the field containing the URL (assuming you have a field that
contains ONLY the URL). Then click the "Specify Application..." button,
select URL Forward, and click Open. Note that you should NOT have the script
bring the application to the front! This will cause the script to fail.
Using URL Forward with AppleScripts
Scripting URL Forward is much easier than using Apple Events for the novice
user. Just use the following simple script:
tell application "URL Forward"
GetURL "someurl"
end tell
That's all there is to it! Of course, the script gets more complicated when
you add ways to extract the URL from different sources, but talking to URL
Forward requires only those three lines.
Quitting URL Forward
If you ever want to quit URL Forward, you can use the enclosed AppleScript.
Optimizing URL Forward
If you are running URL Forward on a non-PowerMac, you can safely reduce it's
memory requirements to around 30K. On a PowerMac it will run native, but
unfortunately, it requires 75K. If you want, you can always use a utility to
strip out the PowerMac code if you want a 68K-only version. Just remember
not to redistribute modified versions!
Contacting the author
My name is Thomas Reed. You may send mail to ThomasReed@aol.com if you have
any questions about or problems with this program. Updates, plus all kinds
of other fun stuff, will be posted on my WWW page at:
http://members.aol.com/thomasreed/
Hope you enjoy the program!
Version history
Version 1.0
* URL Forward is now scriptable
* Improved error handling, including a notification if Internet Config is
not installed
Version 1.0b2
* First public release